﻿#nullable enable
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace REP.Domain.Entities
{
    /// <summary>
    /// 操作记录（关联 BOM），用于审计与追踪
    /// </summary>
    public class OperationLog : BaseEntity
    {
        /// <summary>
        /// 所属 BOM Id（外键）
        /// </summary>
        public Guid? BomId { get; set; }

        /// <summary>
        /// 操作类型（如：新增/修改/删除/审核等）
        /// </summary>
        public string? ActionType { get; set; }

        /// <summary>
        /// 操作人名称/账号
        /// </summary>
        public string? Operator { get; set; }

        /// <summary>
        /// 操作时间
        /// </summary>
        public DateTime? OperatedAt { get; set; }

        /// <summary>
        /// 详细内容（JSON/文本）
        /// </summary>
        public string? Details { get; set; }

        /// <summary>
        /// 来源 IP 地址
        /// </summary>
        public string? SourceIp { get; set; }
    }
}
